﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Data;
namespace BLL
{
    public class UserBLL
    {
        //查询所有套餐
        public static DataTable SelectAllTC()
        {
            return DAL.TCServer.selectAll().Tables[0];
        }
        //查询所有项目
        public static DataTable SelectAllXM()
        {
            return DAL.XMServer.selectAll().Tables[0];
        }
        //添加套餐
        public static int addTC(Model.TC tc)
        {
            return Convert.ToInt32(DAL.TCServer.add(tc));
        }
        //添加项目到套餐
        public static int addXMtoTC(Model.TCrelativeXM tcx)
        {
            return Convert.ToInt32(DAL.TCrelativeXMServer.add(tcx));
        }
        //查询套餐所有项目通过ID
        public static DataTable SelectAllXMbyTCID(Model.TC tc)
        {
            return DAL.XMServer.SelectALLXMByTcId(tc).Tables[0];
        }
    }
}
